package com.gaofans.vertx.boot.dbutils.mapper.columns;

import com.gaofans.vertx.boot.dbutils.mapper.ColumnMapper;
import io.vertx.sqlclient.Row;

public class LongColumnMapper implements ColumnMapper {

    @Override
    public boolean match(Class<?> propType) {
        return propType.equals(Long.TYPE) || propType.equals(Integer.class);
    }

    @Override
    public Object apply(Row r, String columnName) {
        return r.getInteger(columnName);
    }
}
